﻿using Cxuu.Service;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.DependencyInjection;

namespace Cxuu.Web.Authorize
{
    public abstract class WebRazorPage<TModel> : RazorPage<TModel>
    {
        public LoginUtil Authorizer
        {
            get
            {
                return ViewContext.HttpContext.RequestServices.GetService<LoginUtil>();
            }
        }

        public ConfigService SystemConfig
        {
            get
            {
                return ViewContext.HttpContext.RequestServices.GetService<ConfigService>();
            }
        }
    }

}
